package com.start.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.start.admin.entity.StartSysMenu;
import com.start.common.entity.StartBaseMenu;
import com.start.common.service.GlobalBaseMenuService;

import java.util.List;

public interface StartSysMenuService extends IService<StartSysMenu>, GlobalBaseMenuService<StartBaseMenu> {
    List<StartSysMenu> listByUserId(String userId);

    /**
     * 修改稿菜单
     *
     * @param startSysMenu
     */
    void updateMenuById(StartSysMenu startSysMenu);

    /**
     * 删除菜单
     *
     * @param startSysMenu
     */
    void createMenu(StartSysMenu startSysMenu);

    StartSysMenu getOneBySystemCode(String systemCode);

    /**
     * 判断用户是否有权限
     *
     * @param userId
     * @param permissions
     * @return
     */
    boolean userHasPermissions(String userId, String[] permissions);
}
